#include "FileResolver.h"

FileResolver::FileResolver()
{

}
#include <QFile>
#include <QTextStream>
#include <QString>
std::vector<std::vector<double>>FileResolver::Get(QString fileName){
    QFile File(fileName);
    if(!File.open(QIODevice::ReadOnly|QFile::Text))
        return {};
    std::vector<std::vector<double>>res;
    QTextStream job(&File);
    QString line;
    line = job.readLine();
    while(!line.isEmpty()){
        QStringList slist = line.split(",");
        std::vector<double>cur;
        for(QString& val : slist)
            cur.push_back(val.toDouble());
        res.push_back(cur);
        line = job.readLine();
    }
    File.close();
    return res;
}
